'use strict';
/*
解构数组
 */
/*
function breakfast() {
    return ['蛋糕' , '牛奶' , '水果'];
}

let [dangao , niunai , shuiguo] = breakfast();

console.log(dangao , niunai , shuiguo);
*/

/**
 * 解构对象
 */

function breakfast() {
    return {dessert:'蛋糕' , drink:'牛奶' , fruit: '苹果'};
}

let {dessert: dessert , drink: drink , fruit: fruit} = breakfast();
console.log(dessert , drink , fruit);